<template>
  <div class="orders-amount" v-if="list">
    <div class="amount-box">
      <div class="y1">
        <div>商品金额</div>
        <div>￥{{ cart.carTotal }}</div>
      </div>
      <div class="y1">
        <div>退换无忧</div>
        <div>￥0.00</div>
      </div>
      <div class="y1">
        <div>运费</div>
        <div>￥0.00</div>
      </div>
      <div class="y2">
        <div class="y2-1">合计：{{ cart.carTotal }}</div>
      </div>
    </div>
  </div>
</template>

<script lang="ts" setup>
import { useCarStore } from '@/stores/car'
const cart = useCarStore();
//props
const props = defineProps(['list'])

//拿出数据
const renderlist = computed(() => {
  if (props.list) {
    return props.list
  }
  return
})


</script>

<style scoped>
.orders-amount {
  width: 100%;
  /* height: 100%; */
  padding: 4px 16px;
  box-sizing: border-box;
}
.y1 {
  height: 38px;
  display: flex;
  justify-content: space-between;
  line-height: 38px;
  font-size: 14px;
}
.y2 {
  height: 46px;
  border-top: 1px solid #f2f2f2;
  font-size: 20px;
  line-height: 36px;
}
.y2-1 {
  font-size: 16px;
  line-height: 36px;
  float: right;
}
</style>
